/*Replication File for 
Journal of Politics
Facilitating Development: Evidence from a National-Level Experiment on Improving Bureaucratic Performance in Myanmar

Created by Edmund J. Malesky and Dean Dulay
June 6, 2022
STATA Version 16.1


Files include:
1. Draft Manuscript (.pdf)
2. Online Appendix (.pdf)
3. IRB Certificates (.pdf)
4. Original 2019 MBEI report (.pdf)
5. Original 2018 MBEI report (.pdf)
7 STATA .dta files (see Step III below)
8. STATA .do files to replicate analysis (See Step VI below)
9. Official MBEI 2020 Survey Codebook .xls
10. Official MBEI 2020 Observational Data Codebook .xls
11. Codebook generated in .do file #2 with variables used in replication JOP_MBEI_ReplicationData_Codebook.xls
12. Zipped folder of facilitation reports from each workshop.
*/

/*Step I: Create a Central Directory to Store Files*/
cap cd "C:\Users\ejm5\Dropbox\Myanmar_JOP_EGI_replication"


/*Step 2: Install software for making codebook
net install codebookout.pkg*/

/*Step II: Create Subfolder in Central Directory: 
To run this .do file create subfiles within Central Directory to Run. This allows file to store replication materials in proper folder
\do (Stores .do files)
\data (Stores data used in analysis (see Step III below))
\graphs (Stores replicated figures created by analysis)
\tables (Stores replicated tables created by analysis)
*/

/*Step III: Store Data in \data Folder
Official MBEI 2019-2020 Panel Data: "data\20200419_mbei_panel_final.dta"
List of Facilitation Workshop Locatios: "data\workshop.dta"
Official MBEI 2019 Cross-Sectional Data: "data\20191026_mbei2018_cross"
Official MBEI 2020 Cross-Sectional Data: "data\20191026_mbei2020_cross"
Index of New MBEI Indicators crated in .do file 2: "data\20220324_MBEI_NewIndicators.dta"
Index of DAO AND GAD specialized indices created in .do file 3: "data\20210807_mbei_panel_DAOGAD.dta"
Election data in 2015 and 2021: "data\NLD_vote.dta"
*/

/*Step IV: Run .do files*/
/*1. Master .do file to run all files at once
do "do\1_ReadMe_Master.do"*/

/*2 Creates MBEI Index made up only of new 2020 indicators from Official MBEI Panel 2020 Cross-Sectional Data*/
do "do\2_CreateNewMBEI"

/*3. Creates DAO and GAD specialized indices from Official MBEI Panel Data*/
do "do\3_CreateSpecializedDAOGAD"

/*4. Begins with Official MBEI Panel Data and merges other datasets created in 2 and 3 to create Working Data and Codebook*/
do "do\4_SetUp.do"

/*5. Creates Main Analyses Presented in the Manuscript
Appendix E1: Balance table: Lines 12-38
Figure 5: Unadjusted experiemntal results: Lines 40-51
Table 3: Main experimental regression results: Lines 54-80
Not in appendix: Double check to make sure direct weighting and cluster SEs deliver similar results: Lines: 83-89
Table 4: Results by decentralization results: Lines 89-117
*/
do "do\5_MainAnalyses.do"

/*6. Robustness Tests for Appendix E
Table E2: Impact of Facilitation on Official Weighted Core Index: Lines 13-39
Table E3: Robust to Use of Only Survey Data and Only Administrative Data (MBEI Survey (Columns 1-4)): Lines 41-56
Table E5: Impact of Facilitation on New 2020 Indicators: Lines 59-86
Table E7 Impact of Facilitation by Subindex: DAO, GAD, Specialized Shared: Lines 91-118
Table E4 Analysis at Township Level: Lines 123-142
Table E3: Robust to Use of Only Survey Data and Only Administrative Data (MBEI Survey (Columns 5-8)): Lines 146-160
Table E6 Impact of Facilitation on New 2020 Indicators (Township Level): Lines 163-175
Figure E1 Share of Townships and Change in Core MBEI: Lines 179-188
*/
do "do\6_AppendixE_RobustnessTests.do"

/*7. Robustness Tests for Appendix F
Figure F1 Diff-in-Diff Results by Agency and State/Region: Lines 11-68
Not in appendix: Figure Diff-in-Diff Results by Agency for Country: Lines 71-82
Not in appendix: Figure Diff-in-Diff Results by State and Region: 83-96
Table F2 Impact of Facilitation by Agency on New 2020 Indicators: Lines 98-126
Table F4 Impact of Facilitation by Agency (Only Clustered SEs): Lines 130-155
Table F5 Impact of Facilitation by Agency and Data Type on Core Indicators (Survey Data (Columns 1-4)): Lines 157-175
Table F6 Impact of Facilitation by Agency and Data Type on New Indicators (Survey Data (Columns 1-4)): Lines 176-193
Table F7 Impact of Facilitation by Agency (Township Level): Lines 196-214
Table F8 Impact of Facilitation by Agency on New Indicators (Township Level): Lines 218-230
Table F5 Impact of Facilitation by Agency and Data Type on Core Indicators (Hard Data (Columns 5-8)): Lines 233-247
Table F6 Impact of Facilitation by Agency and Data Type on New Indicators (Hard Data (Columns 5-8)): Lines 250-265
*/
do "do\7_AppendixF_RobustnessTests_DAOGAD.do"

/*8. Triple Difference Analysis with Specialized DAO and GAD Indices
Stack data and generate measures: Lines 16-37
Table F1 Direct Comparison of DAO and GAD Indicators (Triple Interaction) (Columns 1-6): Lines 40-57
Not in appendix: Figure of marginal effects of DAO and GAD indicators over time: Lines 59-63
Table F3 Direct Comparison of DAO and GAD Index Indicators (Triple Interaction w/ Only Clustered SEs): Lines 67-83
Table F1 Direct Comparison of DAO and GAD Indicators (Triple Interaction) (Columns 1-6): Lines 86-101
*/
do "do\8_TripleDifference.do"

























